#coding=utf-8

class Aio::Module::Cmd::Cisco::ShowMemory < Aio::Module::Cmd::Cisco
	include Aio::Module

  def initialize
    super({
      :cmd_full   => "show memory",
      :cmd_short  => "sh mem",
      :author     => "Elin",
      :description  => "This is Cisco ASA Command# show memory",
      :ranking    => Ranking_1,
      :platform   => "asa",
      :benchmark  => {
        :proc_ratio => ["<", 70.0],
        }
    })  
	end

	def parse
		cont = self.context.dup
		useful[:memory] = {}
		cont.readline_match_block(/Used memory: .* bytes \((?<proc_ratio>\d+)%/) do |block|
			block.warning_serious(useful[:memory], :proc_ratio, self, {:string => block[:proc_ratio]})
		end
	end
end
